/*************************************
 * Created by WebStorm
 * Author : 菲尔敦
 * QQ邮箱：2891044172@qq.com  手机号：15981761402
 * Created Time :2024/2/5 18:21
 Desc :
 **************************************/
import {ObjectDirective} from 'vue';
import hljs from 'highlight.js'
import 'highlight.js/styles/atom-one-dark.css' //样式
export const highlight: ObjectDirective={
    mounted(el: HTMLButtonElement) {
        let blocks = el.querySelectorAll('pre code');
        blocks.forEach((block)=>{
            hljs.highlightBlock(<HTMLElement>block)
        })
    }
}